Interprocedural Exception Analysis for C++
نویسندگان
چکیده
C++ Exceptions provide a useful way for dealing with abnormal program behavior, but often lead to irregular interprocedural control flow that complicates compiler optimizations and static analysis. In this paper, we present an interprocedural exception analysis and transformation framework for C++ that captures the control-flow induced by exceptions and transforms it into an exception-free program that is amenable for precise static analysis. Control-flow induced by exceptions is captured in a modular interprocedural exception control-flow graph (IECFG). The IECFG is further refined using a novel interprocedural dataflow analysis algorithm based on a compact representation for a set of types called the Signed-TypeSet domain. The results of the interprocedural analysis are used by a lowering transformation to generate an exception-free C++ program. The lowering transformations do not affect the precision and accuracy of any subsequent program analysis. Our framework handles all the features of synchronous C++ exception handling and all exception sub-typing rules from the C++0x standard. We demonstrate two applications of our framework: (a) automatic inference of exception specifications for C++ functions for documentation, and (b) checking the “no-throw” and “no-leak” exception-safety properties.
منابع مشابه
Analysis of Programs with Exception-Handling Constructs
Analysis techniques, such as control-flow, data-flow, and control-dependence, are used for a variety of maintenance tasks, including regression testing, dynamic execution profiling, and static and dynamic slicing. To be applicable to programs in languages, such as Java and C++ however, these analysis techniques should, to the extent possible, account for the effects of exception occurrences and...
متن کاملEstimating Exception-Induced Control Flow for Java
Exception analyses so far cannot provide information on the propagation of thrown exceptions, which is necessary to construct interprocedural control flow graph, visualize exception propagation, and slice exception-related parts of programs. In this paper, we propose a set-based analysis, which estimates exception propagation of Java programs. To formalize exception propagation, we first descri...
متن کاملApplying Scalable Interprocedural Pointer Analysis to Embedded Applications
This paper evaluates six different types of interprocedural pointer analyses on 22 telecommunication and media applications and describes their application to an SRAM power reduction technique. This configurable SRAM provides differentiation of data access time and port counts within a single on-chip structure. Scheduling for configurable SRAM relies on inter-procedural dependence analysis for ...
متن کاملFully Automatic Verification of Absence of Errors via Interprocedural Integer Analysis
We present a interprocedural C String Static Verifier (iCSSV), a whole program analysis algorithm for verifying the safety of string operations in C programs. The algorithm automatically proves linear relationships among pointer expressions. The algorithm is conservative, i.e., it infers only valid relationships although it may fail to detect some of them. The algorithm is targeted to programs ...
متن کاملA Compiler Infrastructure for High-Performance Java
This paper describes the zJava compiler infrastructure, a high-level framework for the analysis and transformation of Java programs. This framework provides a robust system, guaranteeing under transformations both the consistency of its internal structure and the syntactic correctness of the represented code. We address several challenges unique to Java, which have not been addressed by earlier...
متن کامل